﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VK.Casemeet.Groups;
using VK.Comm;
using VK.Casemeet.Merchants;

namespace VK.Casemeet.Web.ShopFront
{
    public partial class Group : System.Web.UI.Page
    {
        public ShopEntity shop = new ShopEntity();
        private int pageindex = 0;

        protected void Page_Load(object sender, EventArgs e)
        {
            int shopID = Util.GetRouteDataInt("ShopID");
            if (shopID != 0)
            {
                shop = ShopBLL.GetShop(shopID);
                (this.Master as Site).shop = shop;
                ShopCard1.shop = shop;
            }

            if (!IsPostBack)
            {
                aspNetPager.RecordCount = GroupsBLL.GroupCount(0, shopID);
                aspNetPager.CurrentPageIndex = pageindex <= 1 ? 1 : pageindex;
                aspNetPager.UrlRewritePattern = "/shop_" + shopID + "/{0}/group.html";
                
                recomgrouplist.ShopId = shopID;
                recomgrouplist.StartIndex = aspNetPager.StartRecordIndex;
                recomgrouplist.EndIndex = aspNetPager.EndRecordIndex;
            }
        }

        


       

      
    }
}